import React, { Component } from "react";

export default class Refone extends Component {
	getData = () => {
		console.dir(this);
	};
	render() {
		return (
			<>
				<h1>字符串形式的[ref]:获取真实dom对象</h1>
				<input type="text" ref="username" />
				<button ref="btn" onClick={this.getData}>
					获取数据
				</button>
			</>
		);
	}
}
